]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
calendar, dateMenu: Allow focus on menu items
authorTanner Doshier <doshitan@gmail.com>
Thu, 14 Mar 2013 15:30:38 +0000 (10:30 -0500)
committerJasper St. Pierre <jstpierre@mecheye.net>
Sat, 4 May 2013 03:20:01 +0000 (23:20 -0400)
https://bugzilla.gnome.org/show_bug.cgi?id=667434

js/ui/calendar.js
js/ui/dateMenu.js

index ed10f60f92e57836d2c02e096164a9f32ccff23e..f182fe27ccb7e7d05464a530244fff4794199a55 100644 (file)
@@ -443,14 +443,16 @@ const Calendar = new Lang.Class({
         this.actor.add(this._topBox,
                        { row: 0, col: 0, col_span: offsetCols + 7 });
 
-        let back = new St.Button({ style_class: 'calendar-change-month-back' });
+        let back = new St.Button({ style_class: 'calendar-change-month-back',
+                                   can_focus: true });
         this._topBox.add(back);
         back.connect('clicked', Lang.bind(this, this._onPrevMonthButtonClicked));
 
         this._monthLabel = new St.Label({style_class: 'calendar-month-label'});
         this._topBox.add(this._monthLabel, { expand: true, x_fill: false, x_align: St.Align.MIDDLE });
 
-        let forward = new St.Button({ style_class: 'calendar-change-month-forward' });
+        let forward = new St.Button({ style_class: 'calendar-change-month-forward',
+                                      can_focus: true });
         this._topBox.add(forward);
         forward.connect('clicked', Lang.bind(this, this._onNextMonthButtonClicked));
 
@@ -590,7 +592,8 @@ const Calendar = new Lang.Class({
         // nRows here means 6 weeks + one header + one navbar
         let nRows = 8;
         while (row < 8) {
-            let button = new St.Button({ label: iter.getDate().toString() });
+            let button = new St.Button({ label: iter.getDate().toString(),
+                                         can_focus: true });
             let rtl = button.get_text_direction() == Clutter.TextDirection.RTL;
 
             if (this._eventSource.isDummy)
index 2613e581ef4cd50e559d8419f86ff9cc524d4a12..fa550be314af43b5c4a3065459e0bb3d3929d611 100644 (file)
@@ -90,12 +90,10 @@ const DateMenuButton = new Lang.Class({
 
         this._openCalendarItem = new PopupMenu.PopupMenuItem(_("Open Calendar"));
         this._openCalendarItem.connect('activate', Lang.bind(this, this._onOpenCalendarActivate));
-        this._openCalendarItem.actor.can_focus = false;
         vbox.add(this._openCalendarItem.actor, {y_align: St.Align.END, expand: true, y_fill: false});
 
         this._openClocksItem = new PopupMenu.PopupMenuItem(_("Open Clocks"));
         this._openClocksItem.connect('activate', Lang.bind(this, this._onOpenClocksActivate));
-        this._openClocksItem.actor.can_focus = false;
         vbox.add(this._openClocksItem.actor, {y_align: St.Align.END, expand: true, y_fill: false});
 
         Shell.AppSystem.get_default().connect('installed-changed',
@@ -105,7 +103,6 @@ const DateMenuButton = new Lang.Class({
         item = this.menu.addSettingsAction(_("Date & Time Settings"), 'gnome-datetime-panel.desktop');
         if (item) {
             item.actor.show_on_set_parent = false;
-            item.actor.can_focus = false;
             item.actor.reparent(vbox);
             this._dateAndTimeSeparator = separator;
         }